#define _CRT_SECURE_NO_WARNINGS
#include <iostream>

using namespace std;

int main()
{
    long long day = 0;
    long long week = 0;

    long long n, a, b;
    cin >> a >> b >> n;

    week = n / (5 * a + 2 * b);
    n -= week * (5 * a + 2 * b);

    while (day >= 0 && n > 0)
    {
        if (day >= 1 && day <= 5)
        {
            n -= a;
            day++;
            if (day == 8)
            {
                day = 1;
                week++;
            }
        }
        else
        {
            n -= b;
            day++;
            if (day == 8)
            {
                day = 1;
                week++;
            }
        }
        if (n <= 0)
        {
            break;
        }
    }

    cout << week * 7 + day << endl;

    return 0;
}